package com.shiguiwu.springboot3.search.service;

import cn.hutool.core.util.RandomUtil;
import com.shiguiwu.springboot3.search.enetity.A;
import com.shiguiwu.springboot3.search.mapper.AMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: 服务层
 * @author: stone
 * @date: Created by 2023/8/29 22:01
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.search
 */
@Service
public class AService {

    @Autowired
    private AMapper aMapper;

    public Integer save(String a) {
        A a1 = new A();
        a1.setA(a);
        a1.setB(RandomUtil.randomNumbers(10));
        return aMapper.insert(a1);
    }
}
